<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="../js/jquery/jquery-1.8.3.min.js?ts=new Date()"></script>
<script type="text/javascript" src="../../js/jquery.js?ts=new Date()"></script>
<script type="text/javascript" src="../../js/jquery-form.js?ts=new Date()"></script>
<script type="text/javascript" src="../js/common/common.js?ts=new Date()"></script>
<script type="text/javascript">
var str = '';
getOData(str,"coreDir/find/all",{fn:function(oData){
	var strhtml_goodColumns = '';
	var arrData = oData.data;
	var ln = arrData.length;
	for(var i=0;i<ln;i++){
		strhtml_goodColumns += '<option value ="'+arrData[i].crdirName+'" >'+arrData[i].crdirName+'</option>';
	}
	$("#strDir").html(strhtml_goodColumns);
}});

getOData(str,"coreDirMovie/find/all",{fn:function(oData){
	var strhtml_goodColumns = '';
	var arrData = oData.data;
	var ln = arrData.length;
	for(var i=0;i<ln;i++){
		strhtml_goodColumns += '<option value ="'+arrData[i].crdirName+'" >'+arrData[i].crdirName+'</option>';
	}
	$("#strDirMovie").html(strhtml_goodColumns);
}});

function sumbit(){
    $.ajax({
		url : urlfile+'coreQuestions/sxsy',
		data:{
			beforeCode: $("#beforeCode").val(),
			afterCode: $("#afterCode").val(),
			strDir: $("#strDir").val(),
			strDirMovie: $("#strDirMovie").val()
		},
		dataType:'html',
		type : 'POST',
		timeout : 30000,
		error : function() {
			alert('提示','响应超时，请刷新页面！');
		},
		success : function(data) {
			var oData = $.parseJSON(data);
			alert(oData.errMsg);
		}
	});
}
</script> 
</head>  
<body>
	数学实验室题目生成从<input type="text" id="beforeCode" />到<input type="text" id="afterCode" />
	<br />
	图片目录:<select id="strDir"></select>
	视频目录:<select id="strDirMovie"></select>
		
	<input type="button" onclick="sumbit()" value="提交" />
</body>
  
</html>